package ij.umasuo.AOTFController;

import ij.ImagePlus;
import ij.umasuo.algorithms.AlgorithmManager;

public class TestCtr implements CtrInterface{
//	String path = "D:\\Jul.25\\BY2\\STORM\\Rawdata7\\";
	String path = "D:\\2013 Dec.05\\Yeast\\Storm\\647\\pos2_0.02uM\\";
	
	int count = 0;
	ImagePlus imp = null;
	
	public TestCtr(){
		
	}
	@Override
	public ImagePlus getNextImage() {
		
		if(count > 93248){
//		if(count > 30){
			AlgorithmManager.getInstance().stopProcessStorm();
			return null;
		}
		count ++;
		imp = new ImagePlus(path+count+".tif");
		return imp;
	}

	@Override
	public ImagePlus getNextImage(int channel) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int getNextChannel() {
		return 0;
	}

	@Override
	public int getNextFrame() {
		return count;
	}

	@Override
	public int getTotalImageCount() {
		// TODO Auto-generated method stub
		return 0;
	}
	@Override
	public String getNextImagePath() {
		
		if(count > 30146){
//			if(count > 6){
			AlgorithmManager.getInstance().stopProcessStorm();
			return null;
		}
		count ++;
		String ret = path+count+".tif";
		return ret;
	}
	@Override
	public String getNextImagePath(int channel) {
		// TODO Auto-generated method stub
		return null;
	}

	
}
